跳转应用市场

1
2
3
4
5
6
7
8
9
public static void goToMarket(Context context, String packageName) {
Uri uri = Uri.parse("market://details?id=" + packageName);
Intent goToMarket = new Intent(Intent.ACTION_VIEW, uri);
try {
context.startActivity(goToMarket);
} catch (ActivityNotFoundException e) {
e.printStackTrace();
}
}

应用宝

1
2
3
4
5
6
7
8
9
10
public static void goToMarket(Context context, String packageName) {
Uri uri = Uri.parse("market://details?id=" + packageName);
Intent goToMarket = new Intent(Intent.ACTION_VIEW, uri);
try {
goToMarket.setClassName("com.tencent.android.qqdownloader", "com.tencent.pangu.link.LinkProxyActivity");
context.startActivity(goToMarket);
} catch (ActivityNotFoundException e) {
e.printStackTrace();
}
}

三星

1
2
3
4
5
6
7
8
9
10
11
public static void goToSamsungappsMarket(Context context, String packageName) {
Uri uri = Uri.parse("http://www.samsungapps.com/appquery/appDetail.as?appId=" + packageName);
Intent goToMarket = new Intent();
goToMarket.setClassName("com.sec.android.app.samsungapps", "com.sec.android.app.samsungapps.Main");
goToMarket.setData(uri);
try {
context.startActivity(goToMarket);
} catch (ActivityNotFoundException e) {
e.printStackTrace();
}
}

乐视

1
2
3
4
5
6
7
void goToLeTVStoreDetail(Context context, String packageName) {
Intent intent = new Intent();
intent.setClassName("com.letv.app.appstore", "com.letv.app.appstore.appmodule.details.DetailsActivity");
intent.setAction("com.letv.app.appstore.appdetailactivity");
intent.putExtra("packageName", packageName);
context.startActivity(intent);
}